home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 351-375 / disk_368 / popmenu / readme < prev    next >
Text File  |  1992-05-06  |  2KB  |  48 lines

  1.                              PopMenu Package
  2.  
  3.                                 07/04/90
  4.                          (c) 1990 by Paul Miller
  5.  
  6.  
  7. The PopMenu Package (popmenu_pak) is a useful package of simple functions
  8. for quick and easy programming of window-dependent pop-up menus.
  9.  
  10. The package gives simple initialization, handling, and freeing of Macintosh-
  11. like pop-up menus. These consist of a box with text in it that, when clicked
  12. on, opens into a menu of items, that can be selected while the mouse is held
  13. down. Releasing the button selects the item under the mouse. There are two
  14. ways to handle these pop-up menus. One kind can display a constant title or
  15. other information and, when clicked on, open the menu for selection. The
  16. other kind can be a list of commands or modes, where the name of the selected
  17. item is displayed in the box after it is selected.
  18.  
  19. This package is ideal for programs that need very window-specific menu items,
  20. but don't need to take up extra space in the menu bar that is useless unless
  21. that window is being worked with.
  22.  
  23. Programs interface with the PopMenu Package via a PMenu structure, which
  24. is based on the normal Menu structure, and the PMenuItem structure, which
  25. is based on the normal MenuItem structure. After varifying which PopMenu
  26. was selected by the user, your application sends the PopMenu Handler a copy
  27. of the PMenu that was selected, and the handler returns the item number
  28. that was selected, or 0 if none was selected. Depending on the type of menu,
  29. it will also update the menu select box text.
  30.  
  31. Please note that the PopMenu Package doesn't use SwapBitsRastPortClipRect()
  32. to render the menu. It just copies the window BitMap where the menu is to be
  33. drawn into a backup BitMap area, then the menu is rendered directly into the
  34. window. Also, no layer locking is performed, so be sure there is no
  35. asynchronus graphics rendering in the window during PopMenu handling. I
  36. didn't want to take the time to figure out the SwapBits... and layer locking,
  37. so I did a simple compromise. If someone fixes this, please let me know.
  38.  
  39. Don't forget to include the "popmenu_pak.h" file in your programs.
  40.  
  41. Refer to "popmenu_pak.doc" for more info.
  42.  
  43. See the included "Test" program for an example of setting up a PopMenu.
  44.  
  45. Feel free to use these functions or the object module in your programs. If
  46. you end up just linking in the popmenu_pak.o object module, kindly mention
  47. me in your credits, eh? -Enjoy.
  48.